<!--${_TPL.put('formtypes',['text':'文本输入', 'select':'单选列表', 'multi':'多选列表'])}-->
<!--$embed{"header.htm"}-->

<div class="mainarea">
<div class="maininner">

<!--$if{ op == 'delete'}-->
	<form method="post" action="admincp.html?ac=profield&op=delete&fieldid=${fieldid}">
	<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
	<div class="bdrcontent">
	<div class="topactions">
		该栏目删除后，请选择该栏目下面已有的群组会归类到那个新栏目。
	</div>
	<table cellspacing="0" cellpadding="0" class="formtable">
	<tr>
		<th width="150">栏目下的群组新归类</th>
		<td>
		<select name="newfieldid">
		<!--$for{entry:newfield} $set{value=entry.value}-->
		<option value="${value['fieldid']}">${value['title']}</option>
		<!--$end-->
		</select>
		</td>
	</tr>
	</table>
	</div>
	
	<div class="footactions">
		<input type="submit" name="deletesubmit" value="确定删除" class="submit">
	</div>

<!--$else-->

	<form method="post" action="admincp.html?ac=profield&fieldid=${thevalue['fieldid']}">
	<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
	<div class="bdrcontent">

		<div class="topactions"><a href="admincp.html?ac=profield">浏览</a> | <a href="admincp.html?ac=profield&op=add">添加</a></div>

<!--$if{!thevalue}-->
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr>
			<th>栏目</th>
			<th>填写类型</th>
			<th>显示顺序</th>
			<th width="80">操作</th>
		</tr>
		<!--$for{value:list}-->
		<tr>
			<th>${value['title']}<input type="hidden" name="editFieldid" value="${value['fieldid']}"/></th>
			<td>${_TPL['formtypes'][value['formtype']]}</td>
			<td><input type="text" name="displayorder" value="${value['displayorder']}" size="5"></td>
			<td width="80">
			<a href="admincp.html?ac=profield&op=edit&fieldid=${value['fieldid']}">编辑</a> | 
			<a href="admincp.html?ac=profield&op=delete&fieldid=${value['fieldid']}">删除</a></td>
		</tr>
		<!--$end-->
		</table>
	</div>
	
	<div class="footactions">
		<input type="submit" name="ordersubmit" value="更新排序" class="submit">
	</div>
	
	</form>
	
<!--$else-->

	<script language="javascript">
		function formtypeShow(value) {
			if(value != 'select') {
				document.getElementById('tb_inputnum').style.display = '';
				document.getElementById('tb_choice').style.display = (value=='text'?'none':'');
			} else {
				document.getElementById('tb_inputnum').style.display = 'none';
				document.getElementById('tb_choice').style.display = '';
			}
		}
	</script>
		
		<table cellspacing="0" cellpadding="0" class="formtable">
		<tr><th style="width:15em;">栏目名称</th><td><input type="text" name="title" value="${thevalue['title']}"></td></tr>
		<tr><th>简单介绍</th><td><input type="text" name="note" value="${thevalue['note']}" size="60"></td></tr>
		<tr><th>群组添加表单类型</th><td>
			<select name="formtype" onchange="formtypeShow(this.value)">
			<option value="text"${formtypearr['text']}>文本输入框</option>
			<option value="select"${formtypearr['select']}>单选列表框</option>
			<option value="multi"${formtypearr['multi']}>多选列表框</option>
			</select>
		</td></tr>

		<tbody id="tb_inputnum"<!--$if{ thevalue['formtype']=='select'}--> style="display:none;"<!--$end-->>
		<tr><th>用户可加入群组最多个数</th><td><input type="text" name="inputnum" value="${thevalue['inputnum']}" size="5"></td></tr>
		</tbody>
	
		<tbody id="tb_choice"<!--$if{ thevalue['formtype']=='text'}--> style="display:none;"<!--$end-->>
		<tr><th>可选值</th><td><textarea name="choice" rows="5" cols="20">${thevalue['choice']}</textarea>
			<br />每行一个值，例如输入:<br />北京<br />上海</td></tr>
		</tbody>
	
		<tr>
			<th>群组讨论区人数下限</th>
			<td><input type="text" name="mtagminnum" value="${thevalue['mtagminnum']}" size="5"> 当群组的成员数达到该数目时，才允许成员在群组内发话题和回帖。</td>
		</tr>
		<tr>
			<th>群组群主手工指定</th>
			<td>
				<input type="radio" name="manualmoderator" value="1"<!--$if{ thevalue['manualmoderator']}--> checked<!--$end-->>手工
				<input type="radio" name="manualmoderator" value="0"<!--$if{!thevalue['manualmoderator']}--> checked<!--$end-->>自动
				<br>如果选择不手工指定，则系统会自动将第一次使用某个群组的用户作为群主。</td>
		</tr>
		<tr>
			<th>群组成员可由群主控制</th>
			<td>
				<input type="radio" name="manualmember" value="1"<!--$if{ thevalue['manualmember']}--> checked<!--$end-->>群主可控制
				<input type="radio" name="manualmember" value="0"<!--$if{!thevalue['manualmember']}--> checked<!--$end-->>会员可自由加入
				<br>群主可控制，则允许群主有权设置群组的会员加入方式，来控制加入群组的会员。</td>
		</tr>
		<tr><th>显示顺序</th><td><input type="text" name="displayorder" value="${thevalue['displayorder']}" size="5"></td></tr>
		</table>
	</div>
		
	<div class="footactions">
		<input type="submit" name="fieldsubmit" value="提交" class="submit">
	</div>
	
	</form>
<!--$end-->

<!--$end-->

</div>
</div>

<div class="side">
	<!--$embed{"side.htm"}-->
</div>

<!--$embed{"footer.htm"}-->